<template>

  <view>
      <view style="position:absolute;background:#66ccff;width:100%;height:200rpx;border-radius:0 0 20rpx 20rpx">
        </view>
    <swiper style="height:400rpx" indicator-dots 	autoplay >
        <swiper-item>
            <view class="swiperview">
            <image src="../../static/imgs/1.jpg" >
            </view>
        </swiper-item>
        <swiper-item>
            <view class="swiperview">
            <image  src="../../static/imgs/2.jpg" >
            </view>
        </swiper-item>
        <swiper-item>
            <view class="swiperview">
            <image src="../../static/imgs/3.jpg" >
            </view>
        </swiper-item>
    </swiper>
    <van-grid :border="false" square clickable direction="horizontal" column-num="3">
      <van-grid-item use-slot  @click="gotoAccount">
        <image class="icon" src="../../static/icons/account.svg"/>
        <div>记账</div>
      </van-grid-item>
      <van-grid-item use-slot @click="goToDiary">
        <image  class="icon" src="../../static/icons/diary.svg"/>
        <div>日记</div>
      </van-grid-item>
      <van-grid-item use-slot  @click="goToSchedule">
        <image  class="icon" src="../../static/icons/course.svg"/>
        <div>课表</div>
      </van-grid-item>
      <van-grid-item use-slot @click="gotoTodo">
        <image  class="icon" src="../../static/icons/todo.svg" />
        <div>代办</div>
      </van-grid-item>
      <van-grid-item use-slot @click="gotoForum">
        <image  class="icon" src="../../static/icons/forum.svg" />
        <div>论坛</div>
      </van-grid-item>
      <van-grid-item use-slot @click="goToEveryday">
        <image  class="icon" src="../../static/icons/everyday.svg" />
        <div>打卡</div>
      </van-grid-item>
    </van-grid>
    <button  open-type="contact" class="btn"  style="line-height:1;font-size:25rpx;font-weight:1000;width:250rpx;border:0;position: fixed;bottom:10%;right:5%;opacity: 0.7;
  z-index: 999" plain>
        <image src="../../static/icons/contact.svg" style="width:150rpx;height:150rpx"/>
        <div>联系我们</div>
    </button>
  </view>
</template>

<script>
export default {
  data() {
    return {};
  },
  methods: {
    goToDiary() {
      uni.navigateTo({
        url: "/pages/diary/diary",
      });
    },
    gotoForum() {
      uni.navigateTo({
        url: "/pages/forum/mainPage/mainPage",
      });
    },
    gotoTodo() {
      uni.navigateTo({
        url: "/pages/todo/index",
      });
    },
    gotoAccount() {
      uni.navigateTo({
        url: "/pages/account/index",
      });
    },
    goToSchedule() {
      uni.navigateTo({
        url: "/pages/schedule/schedule",
      });
    },
    goToEveryday() {
      uni.navigateTo({
        url: "/pages/everyday/everyday",
      });
    },
  },
};
</script>

<style>
page {
  background-color: #ffffff;
}
/* .icon {
  padding: 20rpx;
} */
.swiperview {
  height: 100%;
  margin: 20rpx;
  display: flex;
  flex-direction: row;
  justify-content: center;
}

.swiperview image {
  width: 700rpx;
  height: 90%;
  border-radius: 20rpx;
}

.icon {
  width: 100%;
}
</style>